
let initialState = ["学vue3", "写bug"]

const chatlogReducer = (state = initialState, action) => {
    let { type, payload } = action;
    switch (type) {
        case "ADD_CHAT":
            return [payload, ...state]
        default:
            return [...state]
    }
}

export default chatlogReducer